import { Result } from '@/types/axios';

export interface MemberListResult extends Result {
  list: Array<MemberListModel>;
}
export interface MemberListModel {
  adminName: string;
  amount: string;
  contractType: number;
  index: number;
  name: string;
  no: string;
  paymentType: number;
  status: number;
  updateTime: Date;
}
export interface UserTodaySummaryData {
  forenoonConsumer: number; // 今日晨练划卡次数
  forenoonRemainderCount: number; // 晨练剩余可用次数
  afternoonConsumer: number; // 今日午场划卡次数
  afternoonRemainderCount: number; // 午场剩余可用次数
  nightConsumer: number; // 今日晚场划卡次数
  nightRemainderCount: number; // 晚场剩余可用次数
}
export interface MemberUserInfo {
  cardId?: number;
}

export interface MemberUser extends MemberUserInfo {
  userName: string;
  mobilePhone: string;
}

export interface UserPayParams extends MemberUserInfo {
  payMoney: number;
  payCount: number;
}

export interface AddUserParams {
  userName?: string;
  mobilePhone?: string;
  payMoney: number;
  payCount: number;
  cardType?: number; // 1: 晨练 2：午场 3：晚场
  level?: number; //  0 线下临时  2：美团临时
}

export interface UserConsumerParams extends MemberUserInfo {
  gtConsumerCount?: number;
  todayConsumer?: number;
  useCount?: number;
}

export interface MemberDetail extends MemberUser {
  registerTime: string;
  lastPayTime: string;
  thisMonthPayMoney: number; // 本月充值金额
  thisMonthPayCount: number; // 本月充值次数
  thisMonthUseCount: number; // 本月划卡次数
  thisMonthRemainderCount: number; // 本月剩余次数
  lastMonthRemainderCount: number; // 上月剩余次数
}

export interface MemberDetailResponse extends Result {
  data: MemberDetail;
}

export interface MemberCardLogsParams extends MemberUserInfo {
  month?: string;
  page?: number;
  pageSize?: number;
}

export interface MemberCardLogsResponse extends Result {
  uselogs: Array<MemberCardLogsModel>;
}

export interface MemberCardLogsModel {
  logId: number;
  date: string;
  type: number; // 类型：1.使用 2. 充值
  lastRemainderCount: number; // 上次剩余次数
  useCount: number; // 使用次数
  remainderCount: number; // 剩余次数
}
